//
//  RTJInformationController.m
//  RuiTaiJinProject
//
//  Created by jayson on 2018/12/14.
//  Copyright © 2018年 leewei. All rights reserved.
//

#import "RTJInformationController.h"
#import "RTJCommentController.h"
#import "RTJContactUsController.h"
#import "RTJAutoQuestionController.h"
#import "RTJAgreementController.h"

@interface RTJInformationController ()
@property (weak, nonatomic) IBOutlet UILabel *lab;
@property (weak, nonatomic) IBOutlet UIView *backView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *top;

@end

@implementation RTJInformationController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"信息披露";
    
    self.top.constant = screenH == 812 ? 98 : 74;
    NSString *str = @"瑞泰金互联网金融平台是四川瑞泰金网络科技有限公司旗下的网络借贷信息中介服务平台，由上市公司重庆莱美药业股份有限公司(莱美药业·股票代码300006)战略入股，于2018年10月正式上线。瑞泰金以“让金融更普惠”为使命，通过领先的互联网技术进行金融服务创新，提升金融服务的运营效率和用户体验，让所有普通的个人用户和小微商户都能享受公平、高效和便捷的金融服务。\n\n使命：让金融更普惠\n愿景：成为西南地区安全的金融平台\n价值观：诚信、专业、创新、高效";
    
    _lab.attributedText = [self getAttributedStringWithString:str lineSpace:0];
   
    _backView.layer.cornerRadius = 5;
    _backView.layer.shadowColor = [UIColor colorForHex:@"#dbc9cc"].CGColor;
    _backView.layer.shadowOffset = CGSizeMake(-1, 1);
    _backView.layer.shadowOpacity = 0.5;
    _backView.layer.shadowRadius = 5;
    
    
}

-(NSAttributedString *)getAttributedStringWithString:(NSString *)string lineSpace:(CGFloat)lineSpace {
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:string];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.lineSpacing = lineSpace; // 调整行间距
    NSRange range = NSMakeRange(0, [string length]);
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:range];
    return attributedString;
}

- (IBAction)btn1:(id)sender {
    
    RTJCommentController *vc = [[RTJCommentController alloc]init];
    vc.title = @"平台信息";
    vc.imgName = @"ptxx";
    [self.navigationController pushViewController:vc animated:YES];
}


- (IBAction)btn2:(id)sender {
    
    RTJHTMLViewController *vc = [[RTJHTMLViewController alloc]init];
    vc.title = @"资费说明";
    vc.htmlStr = @"shoufeixieyi";
    [self.navigationController pushViewController:vc animated:YES];
    
}

- (IBAction)btn3:(id)sender {
    
    RTJCommentController *vc = [[RTJCommentController alloc]init];
    vc.title = @"资质证书";
    vc.imgName= @"zzzs";
    [self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)btn4:(id)sender {
    
    RTJAgreementController *vc = [[RTJAgreementController alloc]init];
    vc.title = @"相关协议";
    [self.navigationController pushViewController:vc animated:YES];
}

- (IBAction)btn5:(id)sender {
    
    RTJHTMLViewController *vc = [[RTJHTMLViewController alloc]init];
    vc.title = @"法律法规";
    vc.htmlStr = @"laws_regulations";
    [self.navigationController pushViewController:vc animated:YES];
   
}

- (IBAction)btn7:(id)sender {
    
    RTJHTMLViewController *vc = [[RTJHTMLViewController alloc]init];
    vc.isUrl = YES;
    vc.title = @"合规进展";
    vc.htmlStr = [NSString stringWithFormat:@"%@/public/agreement/compliance_progress.html",IMGURL];
    [self.navigationController pushViewController:vc animated:YES];
    
}

- (IBAction)btn6:(id)sender {
    
    RTJContactUsController *vc = [[RTJContactUsController alloc]init];
    vc.title = @"联系我们";
    [self.navigationController pushViewController:vc animated:YES];

}
@end
